Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd = GetCurrentDir()

# add the general drivers.
src = Split("""
board.c
platform.c
stm32f10x_it.c
usart.c
""")

# add SPI drivers.
if GetDepend('RT_USING_SPI'):
    src += ['rt_stm32f10x_spi.c']
    if GetDepend('RT_USING_LWIP') and GetDepend('RT_USING_ENC28J60'):
        src += ['enc28j60_bsp.c']

CPPPATH = [cwd]

group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)

Return('group')
